package com.kehutong.crm.message.entity;

import org.coraframework.bean.valid.CheckField;
import org.coraframework.orm.Entity;
import org.coraframework.orm.annotation.Column;
import org.coraframework.orm.annotation.Table;
import org.coraframework.orm.util.IDType;
import com.kehutong.crm.message.enums.MessageReceiverType;

@Table(value="t_message_corp", comment="企业消息管理", multi = true, idType = IDType.TIMESTAMP)
public class MessageCorp extends Entity {

    private static final long serialVersionUID = 3336686564480324468L;

    protected MessageCorp(String id) {
        super(id);
    }

    @CheckField("消息标题不能为空")
    @Column(comment="消息标题")
    private String title;

    @CheckField("消息内容不能为空")
    @Column(comment="消息内容", dbType = "TEXT", length = 65535)
    private String content;

    @Column(comment="分类ID")
    private String classifyId;

    @Column(comment="分类名称")
    private String classifyName;

    @CheckField("接收人不能为空")
    @Column(comment = "接收人")
    private MessageReceiverType receiver;

    @Column(comment = "浏览人数")
    private int readNum;

    @Column(comment = "发布状态")
    private boolean releaseStatus;

    @Column(comment = "发布人ID")
    private String releaseUserId;

    @Column(comment = "发布人")
    private String releaseUserName;

    @Column(comment="文件编号")
    private String fileId;

    @Column(comment="文件名称")
    private String fileName;

    @Column(comment="逻辑删除")
    private boolean deleted;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getClassifyId() {
        return classifyId;
    }

    public void setClassifyId(String classifyId) {
        this.classifyId = classifyId;
    }

    public String getClassifyName() {
        return classifyName;
    }

    public void setClassifyName(String classifyName) {
        this.classifyName = classifyName;
    }

    public MessageReceiverType getReceiver() {
        return receiver;
    }

    public void setReceiver(MessageReceiverType receiver) {
        this.receiver = receiver;
    }

    public int getReadNum() {
        return readNum;
    }

    public void setReadNum(int readNum) {
        this.readNum = readNum;
    }

    public boolean isReleaseStatus() {
        return releaseStatus;
    }

    public void setReleaseStatus(boolean releaseStatus) {
        this.releaseStatus = releaseStatus;
    }

    public String getReleaseUserId() {
        return releaseUserId;
    }

    public void setReleaseUserId(String releaseUserId) {
        this.releaseUserId = releaseUserId;
    }

    public String getReleaseUserName() {
        return releaseUserName;
    }

    public void setReleaseUserName(String releaseUserName) {
        this.releaseUserName = releaseUserName;
    }

    public String getFileId() {
        return fileId;
    }

    public void setFileId(String fileId) {
        this.fileId = fileId;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }
}
